'use strict';

import 'preloader';
import l20n from 'l20n';
import Pace from 'pace';
import routes from 'routes';
import router from 'global/router';
import $ from 'jquery';
import vex from 'vex';

var staticUrl = window.staticUrl || '/';
var __APPNAME__ = __APPNAME__ || 'app';


/* Initialize Locales */
l20n.initializeLocales(__APPNAME__, {
    'locales': ['en-US', 'fr', 'it', 'ge', 'ar', 'ch'],
    'default': 'ch'
}, staticUrl.slice(0, -1));

Pace.once('hide', () => {
    $('#pace-loader').removeClass('pace-big').addClass('pace-small');
});
// 设置按钮文本
vex.dialog.buttons.YES.text = '确定';
vex.dialog.buttons.NO.text = '取消';

export default router(routes);
